package com.tarena.demo.luban.all.main.rpc;

import cn.tedu.luban.demo.cart.api.CartApi;
import com.tarena.demo.luban.all.main.service.CartService;
import com.tarena.demo.luban.protocol.cart.param.CartDeleteParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
/*
 类名称 和创建bean id的关系
 Abc  id=abc
 ABC  id=ABC
 CartApiImpl id=cartApiImpl
 */
public class CartApiImpl implements CartApi {
    @Autowired
    private CartService cartService;
    @Override
    public Boolean cartDelete(CartDeleteParam cartDeleteParam) {
        //调用业务层
        cartService.deleteCart(cartDeleteParam);
        System.out.println("删除购物车被调用了:"+cartDeleteParam);
        return true;
    }
    @Override
    public void aaa() {
    }
}
